package com.huike.web.controller.business;

import com.huike.business.domain.TbBusinessTrackRecord;
import com.huike.business.service.ITbBusinessTrackRecordService;
import com.huike.common.core.domain.AjaxResult;
import com.huike.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import com.huike.common.core.controller.BaseController;

import java.util.List;
import java.util.Map;
import java.util.logging.Handler;

/**
 * 商机跟进记录Controller
 * @date 2021-04-28
 */
@RestController
@RequestMapping("/business/record")
public class TbBusinessTrackRecordController extends BaseController {

    @Autowired
    ITbBusinessTrackRecordService businessTrackRecordService;

    @GetMapping("/list")
    public AjaxResult list(TbBusinessTrackRecord businessTrackRecord){
        List<TbBusinessTrackRecord> tbBusinessTrackRecords = businessTrackRecordService.selectTbBusinessTrackRecordList(businessTrackRecord);
        return AjaxResult.success(tbBusinessTrackRecords);
    }

    @PostMapping
    public AjaxResult add(@RequestBody TbBusinessTrackRecord tbBusinessTrackRecord){
        businessTrackRecordService.insertTbBusinessTrackRecord(tbBusinessTrackRecord);
        return AjaxResult.success(null);
    }
}
